/**
 * Copyright (c) 2018, wuxie All rights reserved.
 * qq:16349023,mail:16349023@qq.com
 * 未经许可禁止任何人通过任何渠道使用、修改源代码.
 * 项目名称 : wxcloud
 *
 * @version V1.0
 */
package cn.xo68.boot.auth.core.properties;

import cn.xo68.boot.auth.core.domain.ShiroFilterMapping;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.LinkedList;
import java.util.List;

/**
 *  OAuth Resource properties
 * @author wuxie
 * @date 2018/8/5 16:13
 *
 */
@Data
@ConfigurationProperties("wuxie.auth.resource")
public class OAuthResourceProperties {

    private String clientId;
    private String clientSecret;
    private String accessTokenUrl;
    private String authorizeUrl;
    private String userInfoUrl;

    /**
     * cookie domain
     */
    private String cookieDomain="";

    /**
     * 无状态会话id保存在 request.attribute中的name,放置会话 oauth2令牌
     */
    private String sessionIdAttr="oauth2SessionId";

    /**
     * 无状态会话内容保存在 request.attribute中的name,放置会话内容
     */
    private String sessionValueAttr="oauth2SessionValue";

    /**
     * 过滤器与认证授权映射
     */
    private List<ShiroFilterMapping> filterMappings=new LinkedList<>();

    /**
     * 令牌 cookie name
     */
    private String accessTokenCookieName="atcn";

    /**
     * 令牌缓存过期秒数,默认3小时
     */
    private int tokenExpireSeconds=60*60*12;

    /**
     * 浏览器数据cookie name
     */
    private String browerDataCookieName="browerData";


}
